package com.fallsvc.user.api;

import com.fallsvc.user.api.pojo.request.UserInfoRegisterRequest;
import com.fallsvc.user.api.pojo.request.UserInfoRequest;
import com.fallsvc.user.api.pojo.response.UserInfoResponse;
import com.fallsvc.user.api.pojo.response.UserLoginResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import com.fallsvc.common.pojo.Result;

/**
 * @auther falls_vc
 * description:
 * @date 2025/9/17  8:20
 */
@FeignClient(value = "user-service" , path = "/user")
public interface UserServiceApi {
    @RequestMapping("/login")
    Result<UserLoginResponse> login(@RequestBody UserInfoRequest user);
    @RequestMapping("/getUserInfo")
    Result<UserInfoResponse> getUserInfo(@RequestParam("userId") Integer userId);
    @RequestMapping("/getAuthorInfo")
    Result<UserInfoResponse> getAuthorInfo(@RequestParam("blogId") Integer blogId);

    @RequestMapping("/register")
    Result<Integer> register(@RequestBody UserInfoRegisterRequest registerRequest);
}
